<%-- 
    Document   : AcceptFriend
    Created on : 30.04.2011, 23:24:06
    Author     : ain
--%>

<%@page import="unc.pds.model.UserRemote"%>
<%@page import="unc.pds.service.ServiceBeanRemote"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>acceptPage</title>
    </head>
    <body>
                <%
            if(request.getParameter("id")!=null){
                ServiceBeanRemote sbr = (ServiceBeanRemote)session.getAttribute("service");
                UserRemote user = sbr.getUser();
                Long key = new Long(Long.parseLong(request.getParameter("id")));
                user.acceptInvite(key);
                response.sendRedirect("FriendsPage.jsp");
            }
        %>
    </body>
</html>
